# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Geoffroy Carrier <geoffroy.carrier@aur.archlinux.org>
# Contributor: Eric Belanger <belanger@astro.umontreal.ca>
# Contributor: aeolist <aeolist@hotmail.com>
# Contributor: Gabriel Rauter <rauter.gabriel@gmail.com>

pkgname=sysprof
pkgver=3.26.1
pkgrel=1
pkgdesc="Kernel based performance profiler"
url="https://wiki.gnome.org/Apps/Sysprof"
license=(GPL)
arch=(i686 x86_64)
depends=(gtk3 polkit)
makedepends=(itstool git meson)
_commit=b251a6c85336d0e3646859bff89919c220e75534  # tags/sysprof-3.26.1^0
source=("git+https://git.gnome.org/browse/sysprof#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^sysprof-//;s/-/+/g'
}

prepare() {
  mkdir build
  cd $pkgname
}

build() {
  cd build
  arch-meson ../$pkgname
  ninja
}

check() {
  cd build
  meson test
}

package() {
  cd build
  DESTDIR="$pkgdir" ninja install
}
